package com.navi.loaddata.core.gpEntity;

import javax.persistence.*;

/**
 * Created by Jay on 2018/3/25.
 */
@Entity
@Table(name = "m_param_d", schema = "dm", catalog = "qmsprd")
@IdClass(MParamDPK.class)
public class MParamD {
    private String shopName;
    private String paramCollection;
    private String paramName;
    private String paramCollectionGroup;
    private String paramGroup;
    private String validFlg;

    @Id
    @Column(name = "shop_name")
    public String getShopName() {
        return shopName;
    }

    public void setShopName(String shopName) {
        this.shopName = shopName;
    }

    @Id
    @Column(name = "param_collection")
    public String getParamCollection() {
        return paramCollection;
    }

    public void setParamCollection(String paramCollection) {
        this.paramCollection = paramCollection;
    }

    @Id
    @Column(name = "param_name")
    public String getParamName() {
        return paramName;
    }

    public void setParamName(String paramName) {
        this.paramName = paramName;
    }

    @Basic
    @Column(name = "param_collection_group")
    public String getParamCollectionGroup() {
        return paramCollectionGroup;
    }

    public void setParamCollectionGroup(String paramCollectionGroup) {
        this.paramCollectionGroup = paramCollectionGroup;
    }

    @Basic
    @Column(name = "param_group")
    public String getParamGroup() {
        return paramGroup;
    }

    public void setParamGroup(String paramGroup) {
        this.paramGroup = paramGroup;
    }
    @Basic
    @Column(name = "valid_flg")
    public String getValidFlg() {
        return validFlg;
    }

    public void setValidFlg(String validFlg) {
        this.validFlg = validFlg;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        MParamD mParamD = (MParamD) o;

        if (shopName != null ? !shopName.equals(mParamD.shopName) : mParamD.shopName != null) return false;
        if (paramCollection != null ? !paramCollection.equals(mParamD.paramCollection) : mParamD.paramCollection != null)
            return false;
        if (paramName != null ? !paramName.equals(mParamD.paramName) : mParamD.paramName != null) return false;
        if (paramCollectionGroup != null ? !paramCollectionGroup.equals(mParamD.paramCollectionGroup) : mParamD.paramCollectionGroup != null)
            return false;
        if (paramGroup != null ? !paramGroup.equals(mParamD.paramGroup) : mParamD.paramGroup != null) return false;
        if (validFlg != null ? !validFlg.equals(mParamD.validFlg) : mParamD.validFlg != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = shopName != null ? shopName.hashCode() : 0;
        result = 31 * result + (paramCollection != null ? paramCollection.hashCode() : 0);
        result = 31 * result + (paramName != null ? paramName.hashCode() : 0);
        result = 31 * result + (paramCollectionGroup != null ? paramCollectionGroup.hashCode() : 0);
        result = 31 * result + (paramGroup != null ? paramGroup.hashCode() : 0);
        result = 31 * result + (validFlg != null ? validFlg.hashCode() : 0);

        return result;
    }
}
